package com.baosight.risk.service.fltd.impl;

import com.baosight.risk.api.fltd.FlaaNodeService;
import com.baosight.risk.base.service.BaseServiceImpl;
import com.baosight.risk.mapper.fltd.FlaaNodeMapper;
import com.baosight.risk.service.fltd.entity.FlaaNode;
import com.baosight.risk.service.fltd.vo.FlaaNodeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作者： lishaoqing
 * 时间： 2019年08月16日
 * 描述： FlaaNodeServiceImpl
 * 版本: v1.0
 */
@Service
public class FlaaNodeServiceImpl extends BaseServiceImpl<FlaaNode> implements FlaaNodeService {

    @Autowired
    private FlaaNodeMapper flaaNodeMapper;

    @Override
    public List<FlaaNodeVO> selectFlowNode(String flowNo, String nodeCode) {
        return flaaNodeMapper.selectFlowNode(flowNo, nodeCode);
    }

    @Override
    public FlaaNodeVO selectUrgent(String flowNo, String nodeCode) {
        return flaaNodeMapper.selectUrgent(flowNo, nodeCode);
    }

    @Override
    public Integer deleteFlowNode(String flowNo, String nodeCode) {
        return flaaNodeMapper.deleteFlowNode(flowNo, nodeCode);
    }

    @Override
    public List<FlaaNodeVO> batchSelectUrgent(String flowNo, String nodeCode) {
        String[] split = flowNo.split(";");
        return flaaNodeMapper.batchSelectUrgent(split, nodeCode);
    }
}
